import request from '@/router/axios';

export const getMaterialList = (params) => {
  return request({
    url: '/biz-api/pv-supplier/suppliermaterial/list',
    method: 'get',
    params
  })
}

export const getMaterialDetail = (id) => {
  return request({
    url: '/biz-api/pv-supplier/suppliermaterial/detail',
    method: 'get',
    params: {
      id
    }
  })
}

export const removeMaterial = (ids) => {
  return request({
    url: '/biz-api/pv-supplier/suppliermaterial/remove',
    method: 'post',
    params: {
      ids,
    }
  })
}

export const addMaterial = (row) => {
  return request({
    url: '/biz-api/pv-supplier/suppliermaterial/submit',
    method: 'post',
    data: row
  })
}

export const updateMaterial = (row) => {
  return request({
    url: '/biz-api/pv-supplier/suppliermaterial/submit',
    method: 'post',
    data: row
  })
}

